<div>
    <style>
        .modal-dialog {
            width: 430px;
        }
        .select_box_this {
            margin: 10px 0 20px;
            width: 100%;
            text-align: center;
            font-size: 16px;
        }
    </style>

    <form id="migration" action="__SELF__" method="post" class="ajax-form">
        <input type="hidden" name="ids" value="{$ids}">
        <input type="hidden" name="forum_id" value="{$forum_id}">

        <div class="select_box_this">
                <span>{:L("_SELECTED_NOTES_TO_MIGRATE_TO_THE_FORUM_")}{:L("_COLON_")}</span>
                <span>
                    <select name="forum" style="width: 200px;">
                        <volist name="forum_list" id="forum">
                            <option value="{$forum.id}">{$forum.value}</option>
                        </volist>
                    </select>
                </span>


        </div>
        <div style="width: 100%;text-align: center;">
            <a class="btn btn-primary" data-role="submit">{:L("_MOBILE_")}</a>
            <a onclick="$('.close').click();" class="btn btn-default">{:L("_CANCEL_")}</a>
        </div>
    </form>
</div>

<script>
    $(function(){
        $('[data-role="submit"]').click(function(){
            query=$('#migration').serialize();
            var url=$('#migration').attr('action');
            $.post(url,query,function(msg){
                if(msg.status){
                    toast.success({:L('_MIGRATION_SUCCESS_WITH_SINGLE_')});
                setTimeout(function(){
                    window.location.reload();
                },1500);
            }else{
                handleAjax(msg);
            }
        },'json');
    });
    });
</script>

